<template>
  <Bread>
    <BreadItem to="/">首页</BreadItem>
    <!-- 一级分类 -->
    <BreadItem :to="`/category/${subCategoryData.parentId}`">
      {{ subCategoryData.parentName }}
    </BreadItem>
    <!-- 二级分类 -->
    <BreadItem>{{ subCategoryData.name }}</BreadItem>
  </Bread>
</template>

<script>
import { inject } from 'vue'
export default {
  setup () {
    const subCategoryData = inject('subCategoryData')
    return { subCategoryData }
  }
}
</script>

<style lang="less" scoped>
</style>
